package com.wlyuan.open.domain.source.assembler;

/**
 * @author yuanzheng
 */
public class TemplateAssembler {

    /*private static final Assembler ASSEMBLER = Mappers.getMapper(Assembler.class);

    @Mapper
    public interface Assembler {

        @Mappings({
                @Mapping(source = "pactCode", target = "code"),
                @Mapping(source = "code", target = "templateNo"),
                @Mapping(source = "sourceKey", target = "templateId"),
        })
        TemplateRewriteDTO assemble(OpenTemplateSyncDTO source);


        @Mappings({
                @Mapping(source = "fromProvince", target = "fromAddress.provinceCode"),
                @Mapping(source = "fromProvinceName", target = "fromAddress.province"),
                @Mapping(source = "fromCity", target = "fromAddress.cityCode"),
                @Mapping(source = "fromCityName", target = "fromAddress.city"),
                @Mapping(source = "fromDistrict", target = "fromAddress.districtCode"),
                @Mapping(source = "fromDistrictName", target = "fromAddress.district"),
                @Mapping(source = "fromAddress", target = "fromAddress.address"),
                @Mapping(source = "toProvince", target = "toAddress.provinceCode"),
                @Mapping(source = "toProvinceName", target = "toAddress.province"),
                @Mapping(source = "toCity", target = "toAddress.cityCode"),
                @Mapping(source = "toCityName", target = "toAddress.city"),
                @Mapping(source = "toDistrict", target = "toAddress.districtCode"),
                @Mapping(source = "toDistrictName", target = "toAddress.district"),
                @Mapping(source = "toAddress", target = "toAddress.address"),
        })
        TemplateDivideDTO assemble(QuotationDetailDTO source);

        @Mappings({
                @Mapping(source = "fromProvince", target = "fromAddress.provinceCode"),
                @Mapping(source = "fromProvinceName", target = "fromAddress.province"),
                @Mapping(source = "fromCity", target = "fromAddress.cityCode"),
                @Mapping(source = "fromCityName", target = "fromAddress.city"),
                @Mapping(source = "fromDistrict", target = "fromAddress.districtCode"),
                @Mapping(source = "fromDistrictName", target = "fromAddress.district"),
                @Mapping(source = "fromAddress", target = "fromAddress.address"),
                @Mapping(source = "toProvince", target = "toAddress.provinceCode"),
                @Mapping(source = "toProvinceName", target = "toAddress.province"),
                @Mapping(source = "toCity", target = "toAddress.cityCode"),
                @Mapping(source = "toCityName", target = "toAddress.city"),
                @Mapping(source = "toDistrict", target = "toAddress.districtCode"),
                @Mapping(source = "toDistrictName", target = "toAddress.district"),
                @Mapping(source = "toAddress", target = "toAddress.address"),
        })
        TemplateWholeDTO assembleWhole(QuotationDetailDTO source);

        @Mappings({
                @Mapping(source = "fromProvince", target = "fromAddress.provinceCode"),
                @Mapping(source = "fromProvinceName", target = "fromAddress.province"),
                @Mapping(source = "fromCity", target = "fromAddress.cityCode"),
                @Mapping(source = "fromCityName", target = "fromAddress.city"),
                @Mapping(source = "fromDistrict", target = "fromAddress.districtCode"),
                @Mapping(source = "fromDistrictName", target = "fromAddress.district"),
                @Mapping(source = "fromAddress", target = "fromAddress.address"),
        })
        TemplatePickDTO assemblePick(QuotationDetailDTO source);

        @Mappings({
                @Mapping(source = "toProvince", target = "toAddress.provinceCode"),
                @Mapping(source = "toProvinceName", target = "toAddress.province"),
                @Mapping(source = "toCity", target = "toAddress.cityCode"),
                @Mapping(source = "toCityName", target = "toAddress.city"),
                @Mapping(source = "toDistrict", target = "toAddress.districtCode"),
                @Mapping(source = "toDistrictName", target = "toAddress.district"),
                @Mapping(source = "toAddress", target = "toAddress.address"),
        })
        TemplateDeliverDTO assembleDeliver(QuotationDetailDTO source);
    }

    public static TemplateRewriteDTO assemble(OpenTemplateSyncDTO source) {
        return ASSEMBLER.assemble(source);
    }*/

}
